home *** CD-ROM | disk | FTP | other *** search
- /********************************************************************
- SPELLTXT.CPP
- ********************************************************************/
-
- #ifndef __SPELLTXT_H
- #define __SPELLTXT_H
-
-
- #include "MfcSpell.h"
-
-
- class TSpellText
- {
- private:
- int m_SpellBegPos; // Editor position from which spelling is executed
- int m_SpellEndPos; // Editor position to which spelling is executed
- int m_WordBegPos; // beginning of word which is being edited
- int m_WordEndPos; // end of word which is being edited
-
- BOOL FindNotExistInBoundary(); // Executes loop within m_SpellBegPos and m_SpellEndPos
- int GetFirstWordPos(int pos, BOOL fInclBackPos, BOOL fInclSingleQuote,
- BOOL fIgnoreTexKeywords, int *pWordStartPos, int *pWordEndPos);
-
- public:
-
- // vars
- char m_szString [ 64 ];
- // char m_szSuggested[128]; // pointer to buffer in which suggestions to the
- // // word which is not in dictionary are received
-
- CEditView* m_pEditView;
- TSpellingChecker* m_pSpellChecker;
-
- public: // functions
- TSpellText(CEditView *pEditView, TSpellingChecker *pSpellChecker);
- ~TSpellText();
-
- BOOL StartSpell(int, int); // start of spelling, showing dialog...
- void SelectNotExistSpellWord();
- BOOL FindNextNotExistWord();
- void ReplaceWord(const char *pszWordForReplace);
- };
-
-
- // local class
-
- class TSpellDlg : public CDialog
- {
- private:
- TSpellText * m_pSpellDocument;
- public:
- TSpellDlg(CWnd *, TSpellText *);
- virtual BOOL OnInitDialog();
- void CBEditChange_Suggest();
- void CmIgnore();
- void CmIgnoreAll();
- void CmChange();
- void CmChangeAll();
- void CmSuggest();
- void CmAdd();
- void CmOptions();
- private:
- void GoToNextWord();
-
- DECLARE_MESSAGE_MAP()
- };
-
-
- class TSpellOptionsDynamicDlg : public CDialog
- {
- private:
- TSpellText *m_pSpellDocument;
- public:
- TSpellOptionsDynamicDlg(CWnd *, TSpellText *);
- virtual BOOL OnInitDialog();
- void OnOK();
-
- DECLARE_MESSAGE_MAP()
- };
-
- #endif
-